import { request,Forms } from './request'


// 对应tabbar的分类列表
const selectLabelList = (params) => {
  return request('/xbqmk/selectLabelList', params, 'POST')
}

// 搜索接口
const selectMerchantList = (params) => {
  return request('/symk/selectMerchantList', params, 'POST')
}
// 家电维修商品
const selectjdwxMerchantList = (params) => {
  return request('/symk/selectJDWXMerchantList', params, 'POST')
}
//点击进入店铺详情接口
const selectMerchant = (params) => {
  return request('/sjmk/selectMerchant', params, 'POST')
}
//商品详情接口
const selectProductById = (params) => {
  return request('/sjmk/selectProductById', params, 'POST')
}
// 是否收藏接口
const IsMerchant = (params) => {
  return request('/dpsc/selectFavoriteMerchantById', params, 'GET')
}

// 添加收藏接口
const collectMerchant = (params) => {
  return request('/dpsc/collectMerchant', params, 'GET')
}

//评论数据接口
const selectEvaluateId = (params) => {
  return request('/sjmk/selectEvaluateId', params, 'GET')
}

//商品详情评论接口
const selectEvaluatePro = (params) => {
  return request('/sjmk/selectEvaluatePro', params, 'GET')
}

//举报商家接口
const insertReport = (params) => {
  return request('/appReport/insertReport', params, 'POST')
}

//创建订单
const createOrder = (params) => {
  return request('/app/common/createOrder', params, 'POST')
}

//订单详情
const getUserOrderInfo = (params) => {
  return request('/app/common/getUserOrderInfo', params, 'POST')
}

//取消订单
const cancelOrder = (params) => {
  return request('/app/common/cancelOrder', params, 'POST')
}

//订单退款
const orderReturn = (params) => {
  return request('/app/common/orderReturn', params, 'POST')
}

//撤销退款
const cancelOrderReturn = (params) => {
  return request('/app/common/cancelOrderReturn', params, 'POST')
}

//查询订单状态
const checkWxPayResult = (params) => {
  return request('/app/common/checkWxPayResult', params, 'POST')
}

//商品详情图片接口
const selectProductImg = (params) => {
  return request('/spmk/selectProductImg', params, 'POST')
}

//添加评论
const insertEvaluate = (params) => {
  return request('/sjmk/insertEvaluate', params, 'POST')
}

//个人主页累计评价数量
const selectEvaluateUserCount = (params) => {
  return request('/sjmk/selectEvaluateUserCount', params, 'GET')
}

//大家都在搜
const selectAll = (params) => {
  return request('/sjmk/selectAll', params, 'POST')
}

//二次支付
const jdwxRepairCostsOrder = (params) => {
  return request('/app/common/jdwxRepairCostsOrder', params, 'POST')
}

//获取库存
const selectProductValue = (params) => {
  return request('/spmk/selectProductValue', params, 'POST')
}

//查询配送费
const getTakeoutFee = (params) => {
  return request('/app/common/getTakeoutFee', params, 'POST')
}

//更改地址获取距离
const getTakeoutFeeAndDistance = (params) => {
  return request('/app/common/getTakeoutFeeAndDistance', params, 'POST')
}

//更改地址获取距离
const getVersion = (params) => {
  return request('/Version/getVersion', params, 'POST')
}
//健康检测商家
const onlyoneselectMerchant = (params) => {
  return request('/symk/selectMerchant', params, 'POST')
}

// // 汇付
const toPayJhzs = (params) => {
  return request('/app/common/toPayJhzs', params, 'POST')
}
export {
    insertReport,
    selectEvaluateId,
    selectMerchant,
    selectLabelList,
    selectMerchantList,
    selectjdwxMerchantList,
    collectMerchant,
    createOrder,
    getUserOrderInfo,
    selectEvaluatePro,
    selectProductImg,
    cancelOrder,
    checkWxPayResult,
    orderReturn,
    cancelOrderReturn,
    insertEvaluate,
    selectEvaluateUserCount,
    selectAll,
    jdwxRepairCostsOrder,
    selectProductValue,
    selectProductById,
    getTakeoutFee,
    getTakeoutFeeAndDistance,
    getVersion,
    onlyoneselectMerchant,
    toPayJhzs,
	IsMerchant
}
